#pragma once


// COperatorTreeCtrl

#define		OPER_TREE_ROOT_NODE	0
#define		OPER_TREE_ELEM_NODE	1
#define		OPER_TREE_SUBE_NODE	2
#define		OPER_TREE_ITEM_NODE	4
#define		OPER_TREE_OPER_NODE	3

class COperatorCatalogTreeCtrl : public CTreeCtrl
{
	DECLARE_DYNAMIC(COperatorCatalogTreeCtrl)

public:
	COperatorCatalogTreeCtrl();
	virtual ~COperatorCatalogTreeCtrl();

protected:
	CImageList	m_il;
	HTREEITEM	m_itemSelected;

public:
	void	Populate();
	void	AttachBitmap();

public:
	int		GetNodeType(HTREEITEM hItem);

protected:
	void	PopulateSubElement(z_uint32 nParentCode, HTREEITEM hParentItem);
	void	PopulateItem(z_uint32 nParentCode, HTREEITEM hParentItem);

protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
};


